class NativeEntity {
	List<NativeData> data;
	int code;
	String msg;

	NativeEntity({this.data, this.code, this.msg});

	NativeEntity.fromJson(Map<String, dynamic> json) {
		if (json['data'] != null) {
			data = new List<NativeData>();
			(json['data']['moduleList'] as List).forEach((v) { data.add(new NativeData.fromJson(v)); });
		}
		code = json['code'];
		msg = json['msg'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		if (this.data != null) {
      data['data'] = this.data.map((v) => v.toJson()).toList();
    }
		data['code'] = this.code;
		data['msg'] = this.msg;
		return data;
	}
}

class NativeData {
	// List<NativeDataArticle> articles;
	String 	id;//
  String 	cat_id;//
	String 	name;//
	String 	icon;//
  String type;
	NativeData({this.id,this.name,this.icon, this.type});

	NativeData.fromJson(Map<String, dynamic> json) {
		// if (json['children'] != null) {
		// 	articles = new List<NativeDataArticle>();
		// 	(json['children'] as List).forEach((v) { articles.add(new NativeDataArticle.fromJson(v)); });
		// }
    type = json['type'].toString();
		id = json['id'].toString();
		name = json['name'].toString();
		icon = json['icon'].toString();
    cat_id= json['cat_id'].toString();
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		// if (this.articles != null) {
    //   data['children'] = this.articles.map((v) => v.toJson()).toList();
    // }
    data['type'] = this.type;
    data['cat_id'] = this.cat_id;
		data['id'] = this.id;
		data['name'] = this.name;
		data['icon'] = this.icon;
		return data;
	}
}

// class NativeDataArticle {
// 	String 	cat_id;//
// 	String 	name;//
// 	String 	icon;//
// 	NativeDataArticle({this.cat_id,this.name,this.icon});

// 	NativeDataArticle.fromJson(Map<String, dynamic> json) {
// 		cat_id = json['cat_id'];
// 		name = json['name'];
// 		icon = json['icon'];
// 	}

// 	Map<String, dynamic> toJson() {
// 		final Map<String, dynamic> data = new Map<String, dynamic>();
// 		data['cat_id'] = this.cat_id;
// 		data['name'] = this.name;
// 		data['icon'] = this.icon;
// 		return data;
// 	}
// }
